package com.itcast.service.impl;

import com.itcast.dao.Userdao;
import com.itcast.pojo.User;
import com.itcast.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private Userdao userdao;

    @Override
    public List<User> findall() {

        return userdao.findall();
    }

    @Override
    public User findbyId(int i) {
        return userdao.findbyId(i);
    }

    @Override
    public void update(User user) {
        userdao.update(user);
    }
}
